Skip to content

CI: Avoid using double-asterisk for file matching in the ReadTheDocs#4475

Merged
seisman merged 1 commit intomainfrom
fix-rtd-pathspec
Mar 29, 2026
Merged

CI: Avoid using double-asterisk for file matching in the ReadTheDocs#4475
seisman merged 1 commit intomainfrom
fix-rtd-pathspec

Conversation

@seisman
Copy link
Copy Markdown
Member

@seisman seisman commented Mar 27, 2026

The double-asterisk ** syntax may not always work in all shells (xref: https://stackoverflow.com/a/62985520). This PR avoids using **.

@seisman seisman changed the title RTD: use git pathspecs for Python file matching CI: Use git pathspecs for file matching in ReadTheDocs Mar 27, 2026
@seisman seisman changed the title CI: Use git pathspecs for file matching in ReadTheDocs RTD: use git pathspecs for Python file matching Mar 27, 2026
@seisman seisman marked this pull request as draft March 27, 2026 15:54
@seisman seisman changed the title RTD: use git pathspecs for Python file matching CI: Avoid using double-asterisk for file matching in the ReadTheDocs Mar 27, 2026
@seisman seisman added maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog needs review This PR has higher priority and needs review. labels Mar 27, 2026
@seisman seisman added this to the 0.19.0 milestone Mar 27, 2026
@seisman seisman marked this pull request as ready for review March 27, 2026 17:04
git diff --quiet origin/main -- \
doc/ \
examples \
pygmt/**/*.py \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason to focus on *.py files?

Copy link
Copy Markdown
Member Author

@seisman seisman Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The goal of this command is to trigger ReadTheDocs builds only when documentation files are modified.

The pygmt directory contains only three types of files: *.py, *.txt (in the pygmt/data subdirectory), and *.dvc (in the pygmt/tests/baseline subdirectory). The pygmt/tests/baseline subdirectory is already excluded by the rule below. Therefore, changing pygmt/**/*.py to pygmt/ has no practical effect.

@seisman seisman merged commit d84b516 into main Mar 29, 2026
9 checks passed
@seisman seisman deleted the fix-rtd-pathspec branch March 29, 2026 12:41
@seisman seisman removed the needs review This PR has higher priority and needs review. label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs skip-changelog Skip adding Pull Request to changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants